//
//  QuestionDetalisTableViewCell.m
//  XiangMuB
//
//  Created by 向修根 on 16/8/13.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "QuestionDetalisTableViewCell.h"
#import "QuestionDetalisModel.h"
#import <UIImageView+WebCache.h>

@implementation QuestionDetalisTableViewCell

- (void)layoutSubviews{
    [super layoutSubviews];
    NSDictionary *dic = self.model.answer;
    NSDictionary *dict = self.model.question;
    
    self.answerName.text = dic[@"specialistName"];
    self.answerTitle.text = dic[@"content"];
    self.questionName.text= dict[@"userName"];
    self.questionTitle.text = dict[@"content"];
    
    [self.answerImage sd_setImageWithURL:[NSURL URLWithString:dic[@"specialistHeadPicUrl"]] placeholderImage:nil];
    [self.questionImage sd_setImageWithURL:[NSURL URLWithString:dict[@"userHeadPicUrl"]] placeholderImage:nil];
    
    NSString *str = [NSString stringWithFormat:@"%@",dic[@"supportCount"]];
    
    self.praiseCount.text = str;
    
    //    弧度
    self.cellView.layer.cornerRadius = self.cellView.frame.size.width /50;
    self.cellView.layer.masksToBounds = YES;
    
    //   cell边框
    self.cellView.layer.borderWidth = 2;
    self.cellView.layer.borderColor = [[UIColor colorWithRed:192.0f/255.0f  green:192.0f/255.0f  blue:192.0f/255.0f  alpha:0.7]CGColor];
    
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
